<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:pe="http://primefaces.org/ui/extensions"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:form id="formMain">
	<p:dataTable var="car" value="#{tableBean.cars}" rowKey="#{car}"
		paginator="true" rows="2" selection="#{tableBean.selectedCar}"
		selectionMode="single" filteredValue="#{tableBean.filteredCars}"
		id="carsTable" rowsPerPageTemplate="2,15,20"
		paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}">

		<p:ajax event="rowSelect" oncomplete="carDialog.show()" update=":form1:display"/>

		<f:facet name="header">  
			            List of Cars  
		</f:facet>

		<p:column headerText="Model" sortBy="#{car.model}"
			filterBy="#{car.model}">  
			            #{car.model}  
			        </p:column>

		<p:column headerText="Year" sortBy="#{car.year}"
			filterBy="#{car.year}">  
			            #{car.year}  
			        </p:column>

		<p:column headerText="Manufacturer" sortBy="#{car.manufacturer}"
			filterBy="#{car.manufacturer}">  
			            #{car.manufacturer}  
			        </p:column>

		<p:column headerText="Color" sortBy="#{car.color}"
			filterBy="#{car.color}">  
			            #{car.color}
			        </p:column>
	</p:dataTable>
</h:form>

	<p:growl id="growl"
		showDetail="#{templateConfiguration.GRWL_SHOWDETAIL}"
		autoUpdate="true"
		life="#{templateConfiguration.GRWL_LIFE}" globalOnly="true" />
		
	<pe:tooltip global="true" autoShow="true"  position="left center" targetPosition="right center" forSelector=".ui-state-error"/>
	
	

</html>